package com.java110.mall.market.api;

import com.alibaba.fastjson.JSONObject;
import com.java110.mall.market.bmo.community.IGetCommunityBMO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * 商城查询community信息
 */
@RestController
@RequestMapping(value = "/mallCommunity")
public class MallcommunityApi {

    @Autowired
    private IGetCommunityBMO getCommunityBMO;

    /**
     * 查询 房屋 信息
     *
     * @param communityId 小区ID
     * @return
     * @serviceCode /mallCommunity/getCommunity
     * @path /app/mallCommunity/getCommunity
     */
    @RequestMapping(value = "/getCommunity", method = RequestMethod.GET)
    public ResponseEntity<String> getCommunity(@RequestParam(value = "communityId") String communityId) {
        JSONObject paramIn = new JSONObject();
        paramIn.put("communityId", communityId);
        return getCommunityBMO.getCommunity(paramIn);
    }

}
